﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace ScrumTracker.Models
{
    [MetadataType(typeof(HourLogMetadata))]
    public partial class HourLog
    {
        internal class HourLogMetadata
        {
            [ScaffoldColumn(false)]
            public int HourLogId { get; set; }
            [HiddenInput(DisplayValue = false)]
            public int IssueId { get; set; }
            [Display(Name = "Assignee", Order = 2)]
            [UIHint("AssigneeId")]
            public int AssigneeId { get; set; }
            [AdditionalMetadata("class", "datepicker")]
            [Display(Name = "Date")]
            [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
            public DateTime CreatedAt { get; set; }
            [Display(Name = "Spent Hours")]
            public int? SpentHours { get; set; }
            [Display(Name = "Remaining Hours")]
            [Range(1, 16, ErrorMessage = "Please enter a value between 1 and 16")]
            public int RemainingHours { get; set; }
        }
    }
}